import {getBanners} from "@/api/banners";

export default {
    namespaced:true,
    state:{
        banners:Array
    },
    mutations:{
        SET_BANNERS(state,banners){
            state.banners=banners;
        }
    },
    actions:{
        async loadBanners({commit}){
            var res=await getBanners();
            commit('SET_BANNERS',res.data.data);
        }
    }
}
